Added getmodulename() public interface.
This commit is contained in:
parent
738d4ddf81
commit
0558a205a3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue