mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Added getmodulename() public interface.
This commit is contained in:
parent
738d4ddf81
commit
0558a205a3
2 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue