diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-03-09 12:30:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-03-09 12:30:41 +0000 |
commit | 7f1c9d832d4f24ad0659eedf19fd6986633cbde1 (patch) | |
tree | e290416f215ce2c44782881045983537515acf37 /ethereal_gen.py | |
parent | 6626c6aac2e27bffbba5f1fb7fc61d110bc4765e (diff) | |
download | wireshark-7f1c9d832d4f24ad0659eedf19fd6986633cbde1.tar.gz wireshark-7f1c9d832d4f24ad0659eedf19fd6986633cbde1.tar.bz2 wireshark-7f1c9d832d4f24ad0659eedf19fd6986633cbde1.zip |
From Jaap Keuter: update ethereal_gen.py to generate new-style plugin
dissectors.
svn path=/trunk/; revision=13681
Diffstat (limited to 'ethereal_gen.py')
-rw-r--r-- | ethereal_gen.py | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/ethereal_gen.py b/ethereal_gen.py index 9574872d12..14f8440b39 100644 --- a/ethereal_gen.py +++ b/ethereal_gen.py @@ -216,7 +216,7 @@ class ethereal_gen_C: self.gen_proto_register() self.gen_proto_reg_handoff(oplist) - self.gen_plugin_init() + self.gen_plugin_register() #self.dumpvars() # debug @@ -1450,8 +1450,8 @@ class ethereal_gen_C: # generate code for plugin initialisation # - def gen_plugin_init(self): - self.st.out(self.template_plugin_init, description=self.description, protocol_name=self.protoname, dissector_name=self.dissname) + def gen_plugin_register(self): + self.st.out(self.template_plugin_register, description=self.description, protocol_name=self.protoname, dissector_name=self.dissname) # # generate register_giop_user_module code, and register only @@ -1705,21 +1705,16 @@ static guint32 boundary = GIOP_HEADER_SIZE; /* initial value */ """ # - # plugin_init and plugin_reg_handoff templates + # plugin_register and plugin_reg_handoff templates # - template_plugin_init = """ + template_plugin_register = """ -#ifndef __ETHEREAL_STATIC__ +#ifndef ENABLE_STATIC G_MODULE_EXPORT void -plugin_register(plugin_address_table_t *pat -#ifndef PLUGINS_NEED_ADDRESS_TABLE -_U_ -#endif -){ - /* initialise the table of pointers needed in Win32 DLLs */ - plugin_address_table_init(pat); +plugin_register(void) +{ if (proto_@dissector_name@ == -1) { proto_register_giop_@dissector_name@(); } @@ -2181,8 +2176,6 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { # include "config.h" #endif -#include "plugins/plugin_api.h" - #include <stdio.h> #include <stdlib.h> #include <gmodule.h> @@ -2197,9 +2190,7 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { #include <epan/proto.h> #include "packet-giop.h" -#include "plugins/plugin_api_defs.h" - -#ifndef __ETHEREAL_STATIC__ +#ifndef ENABLE_STATIC G_MODULE_EXPORT const gchar version[] = "0.0.1"; #endif |