+ Call scsh_ldap_constants_export_bindings() during init
+ minor changes
This commit is contained in:
		
							parent
							
								
									d25f445ed2
								
							
						
					
					
						commit
						1bd017ab9b
					
				
							
								
								
									
										21
									
								
								c/ldap.c
								
								
								
								
							
							
						
						
									
										21
									
								
								c/ldap.c
								
								
								
								
							| 
						 | 
				
			
			@ -48,9 +48,9 @@ s48_value scsh_ldap_init(s48_value host, s48_value port)
 | 
			
		|||
  ldap = ldap_init(s48_extract_string(host), s48_extract_integer(port));
 | 
			
		||||
  S48_GC_UNPROTECT();
 | 
			
		||||
  if (ldap == NULL)
 | 
			
		||||
    s48_raise_os_error(errno);
 | 
			
		||||
      s48_raise_os_error(errno);
 | 
			
		||||
  else
 | 
			
		||||
    scsh_enter_ldap(ldap);
 | 
			
		||||
    return scsh_enter_ldap(ldap);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
s48_value scsh_ldap_simple_bind_s(s48_value ldap, s48_value user, s48_value cred)
 | 
			
		||||
| 
						 | 
				
			
			@ -657,7 +657,8 @@ void scsh_init_ldap_bindings(void)
 | 
			
		|||
{
 | 
			
		||||
  ffit_init_hook();
 | 
			
		||||
 | 
			
		||||
  scsh_ldap_gc_protect_globals();
 | 
			
		||||
  scsh_ldap_gc_protect_globals(); /* generated by ffi-tools */
 | 
			
		||||
 | 
			
		||||
  S48_GC_PROTECT_GLOBAL(condition_ldap_memory_alloc_error);
 | 
			
		||||
  S48_GC_PROTECT_GLOBAL(condition_ldap_feature_not_supported);
 | 
			
		||||
  S48_GC_PROTECT_GLOBAL(condition_ldap_read_only_option);
 | 
			
		||||
| 
						 | 
				
			
			@ -669,19 +670,21 @@ void scsh_init_ldap_bindings(void)
 | 
			
		|||
  condition_ldap_read_only_option =
 | 
			
		||||
    s48_get_imported_binding("condition-ldap-read-only-option");
 | 
			
		||||
 | 
			
		||||
  scsh_ldap_enter_ldap_constants();
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldap_record_type, ldap);
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapmessage_record_type, ldap-message);
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapmod_record_type, ldap-modification);
 | 
			
		||||
  scsh_ldap_enter_ldap_constants();		/* generated by ffi-tools */
 | 
			
		||||
  scsh_ldap_constants_export_bindings();	/* generated by ffi-tools */
 | 
			
		||||
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapapiinfo_record_type, ldap-api-info);
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldap_record_type, "ldap-session");
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapmessage_record_type, "ldap-message");
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapmod_record_type, "ldap-modification");
 | 
			
		||||
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_ldapapiinfo_record_type, "ldap-api-info");
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldapapiinfo_get_info_version);
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldapapiinfo_get_protocol_version);
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldapapiinfo_get_vendor_name);
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldapapiinfo_get_vendor_version);
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldapapiinfo_get_extensions);
 | 
			
		||||
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_berelement_record_type, ber-element);
 | 
			
		||||
  FFIT_RECORD_TYPE_INIT(scsh_berelement_record_type, "ber-element");
 | 
			
		||||
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldap_init);
 | 
			
		||||
  S48_EXPORT_FUNCTION(scsh_ldap_simple_bind_s);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue