diff options
| author | Christopher Davis <loafier@gmail.com> | 2006-08-12 21:58:42 +0000 |
|---|---|---|
| committer | Christopher Davis <loafier@gmail.com> | 2006-08-12 21:58:42 +0000 |
| commit | f13ea25509e932d426ebd69d90368fe9b1d4c1ab (patch) | |
| tree | 98883c3fd1c4e7912320ba0013a851bfde9133cc /constants.awk | |
| parent | b1b54c58af7cd9419631d7b82b860a7b19097836 (diff) | |
| download | irssi-python-f13ea25509e932d426ebd69d90368fe9b1d4c1ab.tar.gz irssi-python-f13ea25509e932d426ebd69d90368fe9b1d4c1ab.tar.xz irssi-python-f13ea25509e932d426ebd69d90368fe9b1d4c1ab.zip | |
added support for constants
git-svn-id: http://svn.irssi.org/repos/irssi-python@4311 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'constants.awk')
| -rw-r--r-- | constants.awk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/constants.awk b/constants.awk index 18f8002..3aa5034 100644 --- a/constants.awk +++ b/constants.awk @@ -1,5 +1,9 @@ BEGIN { - print "static PY_CONSTANT_REC py_constants[] = {"; + print "#include \"pymodule.h\""; + print "#include \"pyirssi_irc.h\""; + print + print "void pyconstants_init(void)" + print "{" } { @@ -8,11 +12,9 @@ BEGIN { else constant = $1; - printf(" {\"%s\", %25s},\n", $1, constant); + printf(" PyModule_AddIntConstant(py_module, \"%s\", %s);\n", $1, constant); } END { - print " {NULL}"; - print "};" + print "}" } - |
