mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
new name after fork
This commit is contained in:
@@ -5,11 +5,11 @@ import cffi
|
||||
|
||||
builder = cffi.FFI()
|
||||
|
||||
# hexchat-plugin.h
|
||||
# zoitechat-plugin.h
|
||||
with open(sys.argv[1]) as f:
|
||||
output = []
|
||||
eat_until_endif = 0
|
||||
# This is very specific to hexchat-plugin.h, it is not a cpp
|
||||
# This is very specific to zoitechat-plugin.h, it is not a cpp
|
||||
for line in f:
|
||||
if line.startswith('#define'):
|
||||
continue
|
||||
@@ -21,7 +21,7 @@ with open(sys.argv[1]) as f:
|
||||
eat_until_endif += 1
|
||||
elif line.startswith('#endif'):
|
||||
eat_until_endif -= 1
|
||||
elif eat_until_endif and '_hexchat_context' not in line:
|
||||
elif eat_until_endif and '_zoitechat_context' not in line:
|
||||
continue
|
||||
else:
|
||||
output.append(line)
|
||||
@@ -36,30 +36,30 @@ extern "Python" int _on_say_command(char **, char **, void *);
|
||||
|
||||
extern "Python" int _on_command_hook(char **, char **, void *);
|
||||
extern "Python" int _on_print_hook(char **, void *);
|
||||
extern "Python" int _on_print_attrs_hook(char **, hexchat_event_attrs *, void *);
|
||||
extern "Python" int _on_print_attrs_hook(char **, zoitechat_event_attrs *, void *);
|
||||
extern "Python" int _on_server_hook(char **, char **, void *);
|
||||
extern "Python" int _on_server_attrs_hook(char **, char **, hexchat_event_attrs *, void *);
|
||||
extern "Python" int _on_server_attrs_hook(char **, char **, zoitechat_event_attrs *, void *);
|
||||
extern "Python" int _on_timer_hook(void *);
|
||||
|
||||
extern "Python" int _on_plugin_init(char **, char **, char **, char *, char *);
|
||||
extern "Python" int _on_plugin_deinit(void);
|
||||
|
||||
static hexchat_plugin *ph;
|
||||
static zoitechat_plugin *ph;
|
||||
''')
|
||||
|
||||
builder.set_source('_hexchat_embedded', '''
|
||||
builder.set_source('_zoitechat_embedded', '''
|
||||
/* Python's header defines these.. */
|
||||
#undef HAVE_MEMRCHR
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
#include "config.h"
|
||||
#include "hexchat-plugin.h"
|
||||
#include "zoitechat-plugin.h"
|
||||
|
||||
static hexchat_plugin *ph;
|
||||
static zoitechat_plugin *ph;
|
||||
CFFI_DLLEXPORT int _on_plugin_init(char **, char **, char **, char *, char *);
|
||||
CFFI_DLLEXPORT int _on_plugin_deinit(void);
|
||||
|
||||
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
||||
int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
||||
char **name_out, char **description_out,
|
||||
char **version_out, char *arg)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
||||
return _on_plugin_init(name_out, description_out, version_out, arg, HEXCHATLIBDIR);
|
||||
}
|
||||
|
||||
int hexchat_plugin_deinit(void)
|
||||
int zoitechat_plugin_deinit(void)
|
||||
{
|
||||
int ret = _on_plugin_deinit();
|
||||
ph = NULL;
|
||||
|
||||
Reference in New Issue
Block a user