Example #1
0
        public static symbol make_symbol( byte[] name )
        {
            lock( table ) {
            int hash_number = foreign.get_hash_power_number( name, 12 );
            bucket _bucket = table[hash_number];

            if (_bucket == null) {
               symbol _symbol = new symbol( nil._nil, name );

               table[hash_number] = new bucket( _symbol, null );
               return _symbol;
            }

            for (bucket run = _bucket ; (run != null) ; run = run.next)
               if (foreign.bigloo_strcmp( run.symb.pname, name ))
              return run.symb;

            symbol result = new symbol( nil._nil, name );

            table[hash_number] = new bucket( result, _bucket );

            return result;
             }
        }
Example #2
0
 public static byte[] SYMBOL_TO_STRING( symbol  o )
 {
     // CARE why not a correct signature in Scheme
     return o.pname;
 }
Example #3
0
        public static Object SET_SYMBOL_PLIST( symbol  o,
					     Object  v )
        {
            o.cval= v;
            return unspecified._unspecified;
        }
Example #4
0
 public static bstruct make_struct( symbol key, int size, Object o )
 {
     return new bstruct( key, size, o );
 }
Example #5
0
 public static Object GET_SYMBOL_PLIST( symbol  o )
 {
     return o.cval;
 }
Example #6
0
 public static bstruct create_struct( symbol key, int size )
 {
     return new bstruct( key, size );
 }
Example #7
0
 public static int bgl_symbol_hash_number( symbol  obj )
 {
     return (1 + bgl_string_hash_number( SYMBOL_TO_STRING( obj ) ));
 }
Example #8
0
 public bucket( symbol symb, bucket next )
 {
     this.symb = symb;
     this.next = next;
 }