I'm having some trouble, I get a segmentation fault in f_function_name, which I'm not sure how to debug.
First, I'd like to know if the inheritance works correctly, the below is the generated code. If I hade written it by hand, I would have put the ADD_STORAGE after the low_inherit calls.
#ifdef PROG_MD5_STATE_ID START_NEW_PROGRAM_ID(MD5_STATE); #else start_new_program();
#endif /* PROG_MD5_STATE_ID */
#ifdef THIS_MD5_STATE
md5_state_storage_offset=ADD_STORAGE(struct md5_state_struct);
#endif /* THIS_MD5_STATE */
#ifdef inherit_hash_instance_md5_state_defined low_inherit(hash_instance_program, NULL, -1, 0, 0, NULL); #endif /* inherit_hash_instance_md5_state_defined */
#ifdef inherit_nettle_md5_md5_state_defined low_inherit(nettle_md5_program, NULL, -1, 0, 0, NULL); #endif /* inherit_nettle_md5_md5_state_defined */
#ifdef md5_state_event_handler_defined pike_set_prog_event_callback(md5_state_event_handler);
#endif /* md5_state_event_handler_defined */ md5_state_program=end_program(); add_program_constant("md5_state",md5_state_program,0);
The generated code looks ok to me. The ADD_STORAGE() must currently be first, since the generated THIS macro doesn't take the storage offset into account.
/ Henrik Grubbström (Lysator)
Previous text:
2003-03-13 15:12: Subject: Inherit in .cmod
I'm having some trouble, I get a segmentation fault in f_function_name, which I'm not sure how to debug.
First, I'd like to know if the inheritance works correctly, the below is the generated code. If I hade written it by hand, I would have put the ADD_STORAGE after the low_inherit calls.
#ifdef PROG_MD5_STATE_ID START_NEW_PROGRAM_ID(MD5_STATE); #else start_new_program();
#endif /* PROG_MD5_STATE_ID */
#ifdef THIS_MD5_STATE
md5_state_storage_offset=ADD_STORAGE(struct md5_state_struct);
#endif /* THIS_MD5_STATE */
#ifdef inherit_hash_instance_md5_state_defined low_inherit(hash_instance_program, NULL, -1, 0, 0, NULL); #endif /* inherit_hash_instance_md5_state_defined */
#ifdef inherit_nettle_md5_md5_state_defined low_inherit(nettle_md5_program, NULL, -1, 0, 0, NULL); #endif /* inherit_nettle_md5_md5_state_defined */
#ifdef md5_state_event_handler_defined pike_set_prog_event_callback(md5_state_event_handler);
#endif /* md5_state_event_handler_defined */ md5_state_program=end_program(); add_program_constant("md5_state",md5_state_program,0);
/ Niels Möller ()
pike-devel@lists.lysator.liu.se