13 byval imp_
as FBSYMBOL
ptr _
18 byval imp_
as FBSYMBOL
ptr _
23 byval imp_
as FBSYMBOL
ptr _
28 byval imp_
as FBSYMBOL
ptr _
34 byval id
as zstring ptr, _
35 byval id_alias
as zstring ptr _
38 dim as FBSYMBOL
ptr s =
any
41 if( id_alias = NULL )
then
43 if( parser.mangling <> FB_MANGLING_BASIC )
then
51 FB_SYMBCLASS_NAMESPACE, _
53 FB_DATATYPE_NAMESPC, NULL )
58 symbSymbTbInit( s->nspc.ns.symtb, s )
59 symbHashTbInit( s->nspc.ns.hashtb, s, FB_INITSYMBOLNODES \ 10 )
63 s->nspc.last_tail = NULL
71 byval s
as FBSYMBOL
ptr, _
72 byval delete_hashtb
as integer _
82 while( symbGetCompSymbTb( s ).tail )
86 if( s->nspc.ns.ext )
then
87 symbCompFreeExt( s->nspc.ns.ext )
91 if( delete_hashtb )
then
92 hashEnd( @s->nspc.ns.hashtb.tb )
104 byval dst_ns
as FBSYMBOL
ptr _
107 dim as FBSYMBOLTB
ptr symbtb =
any
108 dim as FBHASHTB
ptr hashtb =
any
109 dim as integer is_local =
any
111 if( dst_ns = symbGetCurrentNamespc( ) )
then
116 symbtb = @symbGetCompSymbTb( dst_ns )
117 hashtb = @symbGetCompHashTb( dst_ns )
118 is_local = symbIsLocal( dst_ns )
126 FB_SYMBCLASS_NSIMPORT, _
128 FB_DATATYPE_INVALID, NULL, _
135 byval ns
as FBSYMBOL
ptr _
139 symbGetCompExt( ns )->cnt += 1
140 if( symbGetCompExt( ns )->cnt = 1 )
then
149 byval ns
as FBSYMBOL
ptr _
153 symbGetCompExt( ns )->cnt -= 1
154 if( symbGetCompExt( ns )->cnt = 0 )
then
163 byval src_ns
as FBSYMBOL
ptr, _
164 byval dst_ns
as FBSYMBOL
ptr _
167 dim as FBSYMBOL
ptr parent = dst_ns
168 do until( parent = @symbGetGlobalNamespc( ) )
169 if( src_ns = parent )
then
172 parent = symbGetNamespace( parent )
182 byval src_ns
as FBSYMBOL
ptr, _
183 byval dst_ns
as FBSYMBOL
ptr _
186 if( symbGetCompExt( dst_ns ) <> NULL )
Then
188 dim as FBSYMBOL
ptr imp_ = symbGetCompImportHead( dst_ns )
190 do while( imp_ <> NULL )
191 if( symbGetImportNamespc( imp_ ) = src_ns )
then
194 imp_ = symbGetImportNext( imp_ )
206 byval ns
as FBSYMBOL
ptr, _
207 byval to_ns
as FBSYMBOL
ptr _
215 if( symbGetCompExt( ns ) = NULL )
then
216 symbGetCompExt( ns ) = symbCompAllocExt( )
221 dim as FBSYMBOL
ptr imp_ =
any
224 if( imp_ = NULL )
then
228 imp_->nsimp.imp_ns = ns
229 imp_->nsimp.exp_ns = to_ns
238 imp_ = symbGetCompImportHead( ns )
239 do while( imp_ <> NULL )
241 imp_ = symbGetImportNext( imp_ )
255 byval ns
as FBSYMBOL
ptr _
265 byval imp_
as FBSYMBOL
ptr, _
266 byval hashonly
as integer _
269 if( symbGetImportNamespc( imp_ ) <> NULL )
then
274 symbGetImportNamespc( imp_ ) = NULL
277 if( hashonly = FALSE )
then
287 byval ns
as FBSYMBOL
ptr _
291 if( symbGetCompExt( ns )->impsym_head <> NULL )
then
292 dim as FBSYMBOL
ptr head = symbGetNamespaceLastTail( ns )
293 if( head = NULL )
then
294 head = symbGetNamespaceTbHead( ns )
300 if( head <> NULL )
then
308 dim as FBSYMBOL
ptr exp_ = symbGetCompExportHead( ns )
309 do while( exp_ <> NULL )
310 dim as FBSYMBOL
ptr imp_ = symbGetCompImportHead( ns )
311 do while( imp_ <> NULL )
313 symbGetExportNamespc( exp_ ) )
314 imp_ = symbGetImportNext( imp_ )
316 exp_ = symbGetExportNext( exp_ )