diff options
author | James Henstridge <james@daa.com.au> | 2001-09-15 02:59:54 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2001-09-15 02:59:54 +0000 |
commit | a8e9f647aa464b8423f32195602540009cc461e7 (patch) | |
tree | 85ac470e757131eb0e65fa3483efffa3088cd07e | |
parent | d7349b5905548799554bb351634a31513843e415 (diff) | |
download | pygobject-a8e9f647aa464b8423f32195602540009cc461e7.tar.gz |
allow '_' as start of constant name. (pyg_flags_add_constants): same here.
2001-09-15 James Henstridge <james@daa.com.au>
* gobjectmodule.c (pyg_enum_add_constants): allow '_' as start of
constant name.
(pyg_flags_add_constants): same here.
-rw-r--r-- | gobject/gobjectmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 32c31c70..646ddedb 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -2143,7 +2143,7 @@ pyg_enum_add_constants(PyObject *module, GType enum_type, /* strip off prefix from value name, while keeping it a valid * identifier */ for (j = prefix_len; j >= 0; j--) { - if (g_ascii_isalpha(name[j])) { + if (g_ascii_isalpha(name[j]) || name[j] == '_') { name = &name[j]; break; } @@ -2179,7 +2179,7 @@ pyg_flags_add_constants(PyObject *module, GType flags_type, /* strip off prefix from value name, while keeping it a valid * identifier */ for (j = prefix_len; j >= 0; j--) { - if (g_ascii_isalpha(name[j])) { + if (g_ascii_isalpha(name[j]) || name[j] == '_') { name = &name[j]; break; } |