diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index e28158e..a469797 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -194,6 +194,20 @@ getattr(v, name) } int +hasattr(v, name) + object *v; + char *name; +{ + object *res = getattr(v, name); + if (res != NULL) { + DECREF(res); + return 1; + } + err_clear(); + return 0; +} + +int setattr(v, name, w) object *v; char *name; |