Kaydet (Commit) 0558a205 authored tarafından Guido van Rossum's avatar Guido van Rossum

Added getmodulename() public interface.

üst 738d4ddf
......@@ -7,3 +7,4 @@ extern typeobject Moduletype;
extern object *newmoduleobject PROTO((char *));
extern object *getmoduledict PROTO((object *));
extern int setmoduledict PROTO((object *, object *));
extern char *getmodulename PROTO((object *));
......@@ -62,6 +62,17 @@ setmoduledict(m, v)
return 0;
}
char *
getmodulename(m)
object *m;
{
if (!is_moduleobject(m)) {
err_badarg();
return NULL;
}
return getstringvalue(((moduleobject *)m) -> md_name);
}
/* Methods */
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment