pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: zlibmod.c,v 1.22 1999/02/01 02:42:32 hubbe Exp $"); + RCSID("$Id: zlibmod.c,v 1.23 1999/02/10 21:47:46 hubbe Exp $");      #include "zlib_machine.h"      #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ)   #undef HAVE_ZLIB_H   #endif      #ifdef HAVE_ZLIB_H      #include "interpret.h"
pike.git/src/modules/Gz/zlibmod.c:372:   #endif      void pike_module_exit(void) {}      void pike_module_init(void)   {   #ifdef HAVE_ZLIB_H    start_new_program();    ADD_STORAGE(struct zipper);    -  add_function("create",gz_deflate_create,"function(int|void:void)",0); -  add_function("deflate",gz_deflate,"function(string,int|void:string)",0); +  /* function(int|void:void) */ +  ADD_FUNCTION("create",gz_deflate_create,tFunc(tOr(tInt,tVoid),tVoid),0); +  /* function(string,int|void:string) */ +  ADD_FUNCTION("deflate",gz_deflate,tFunc(tStr tOr(tInt,tVoid),tStr),0);       add_integer_constant("NO_FLUSH",Z_NO_FLUSH,0);    add_integer_constant("PARTIAL_FLUSH",Z_PARTIAL_FLUSH,0);    add_integer_constant("SYNC_FLUSH",Z_SYNC_FLUSH,0);    add_integer_constant("FINISH",Z_FINISH,0);       set_init_callback(init_gz_deflate);    set_exit_callback(exit_gz_deflate);       end_class("deflate",0);       start_new_program();    ADD_STORAGE(struct zipper);    -  add_function("create",gz_inflate_create,"function(int|void:void)",0); -  add_function("inflate",gz_inflate,"function(string:string)",0); +  /* function(int|void:void) */ +  ADD_FUNCTION("create",gz_inflate_create,tFunc(tOr(tInt,tVoid),tVoid),0); +  /* function(string:string) */ +  ADD_FUNCTION("inflate",gz_inflate,tFunc(tStr,tStr),0);       add_integer_constant("NO_FLUSH",Z_NO_FLUSH,0);    add_integer_constant("PARTIAL_FLUSH",Z_PARTIAL_FLUSH,0);    add_integer_constant("SYNC_FLUSH",Z_SYNC_FLUSH,0);    add_integer_constant("FINISH",Z_FINISH,0);       set_init_callback(init_gz_inflate);    set_exit_callback(exit_gz_inflate);       end_class("inflate",0);       add_integer_constant("NO_FLUSH",Z_NO_FLUSH,0);    add_integer_constant("PARTIAL_FLUSH",Z_PARTIAL_FLUSH,0);    add_integer_constant("SYNC_FLUSH",Z_SYNC_FLUSH,0);    add_integer_constant("FINISH",Z_FINISH,0);    -  add_function("crc32",gz_crc32, -  "function(string,void|int:int)", +  /* function(string,void|int:int) */ +  ADD_FUNCTION("crc32",gz_crc32,tFunc(tStr tOr(tVoid,tInt),tInt),    OPT_TRY_OPTIMIZE);      #endif   }      #if defined(HAVE___VTBL__9TYPE_INFO) || defined(HAVE___T_9__NOTHROW)   /* Super-special kluge for IRIX 6.3 */   #ifdef HAVE___VTBL__9TYPE_INFO   extern void __vtbl__9type_info(void);   #endif /* HAVE___VTBL__9TYPE_INFO */