浏览代码

Fix regression: methods returning const char pointer were ignored.

rdb 10 年之前
父节点
当前提交
eaedfa68dc
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      dtool/src/interrogate/interfaceMakerPythonNative.cxx

+ 3 - 2
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -6415,8 +6415,9 @@ is_remap_legal(FunctionRemap *remap) {
   }
 
   // We don't currently support returning pointers, but we accept
-  // them as function parameters.
-  if (TypeManager::is_pointer_to_simple(remap->_return_type->get_orig_type())) {
+  // them as function parameters.  But const char * is an exception.
+  if (!remap->_return_type->new_type_is_atomic_string() &&
+      TypeManager::is_pointer_to_simple(remap->_return_type->get_orig_type())) {
     return false;
   }