Skip to content
Snippets Groups Projects
Commit e93c3524 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot
Browse files

Merge topic 'python-hide-addfile'


17380f6f Hide the Python module implementation init function
0eae306f Hide the Python wrapper ClassNew, TypeNew functions
332bad11 Hide the Python wrapper AddFile functions

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarbuildbot <buildbot@kitware.com>
Reviewed-by: default avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !11831
parents 724fe4bd 17380f6f
No related branches found
No related tags found
Loading
......@@ -395,7 +395,7 @@ int VTK_PARSE_MAIN(int argc, char* argv[])
/* do the export of the main entry point */
fprintf(
fp, "extern \"C\" { %s void PyVTKAddFile_%s(PyObject *dict); }\n", "VTK_ABI_EXPORT", name);
fp, "extern \"C\" { %s void PyVTKAddFile_%s(PyObject *dict); }\n", "VTK_ABI_HIDDEN", name);
/* get the module that is being wrapped */
data = file_info->MainClass;
......
......@@ -308,7 +308,7 @@ static void vtkWrapPython_ExportVTKClass(FILE* fp, ClassInfo* data, const Hierar
vtkWrapText_PythonName(data->Name, classname);
/* for vtkObjectBase objects: export New method for use by subclasses */
fprintf(fp, "extern \"C\" { PyObject *Py%s_ClassNew(); }\n\n", classname);
fprintf(fp, "extern \"C\" { %s PyObject *Py%s_ClassNew(); }\n\n", "VTK_ABI_HIDDEN", classname);
/* declare ClassNew method for superclass, if it is in the same module */
supername = vtkWrapPython_GetSuperClass(data, hinfo, &supermodule);
......
......@@ -36,8 +36,6 @@ static void CreateImplFile(
{
int i;
const char* dllexp = "VTK_ABI_EXPORT ";
fprintf(fout, "// Generated by vtkWrapPythonInit in VTK/Wrapping\n");
fprintf(fout, "#include \"vtkPythonUtil.h\"\n");
fprintf(fout, "#include \"vtkSystemIncludes.h\"\n");
......@@ -68,8 +66,8 @@ static void CreateImplFile(
fprintf(fout, " nullptr // m_free\n");
fprintf(fout, "};\n");
fprintf(fout, "extern \"C\" {%sPyObject *real_init%s(const char * /*unused*/); }\n\n", dllexp,
libName);
fprintf(fout, "extern \"C\" {%s PyObject *real_init%s(const char * /*unused*/); }\n\n",
"VTK_ABI_HIDDEN", libName);
fprintf(fout, "PyObject *real_init%s(const char * /*unused*/)\n{\n", libName);
......
......@@ -789,10 +789,10 @@ void vtkWrapPython_GenerateSpecialType(FILE* fp, const char* module, const char*
/* export New method for use by subclasses */
fprintf(fp,
"#ifndef DECLARED_Py%s_TypeNew\n"
"extern \"C\" { PyObject *Py%s_TypeNew(); }\n"
"extern \"C\" { %s PyObject *Py%s_TypeNew(); }\n"
"#define DECLARED_Py%s_TypeNew\n"
"#endif\n\n",
classname, classname, classname);
classname, "VTK_ABI_HIDDEN", classname, classname);
/* import New method of the superclass */
if (has_superclass && !supermodule)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment