Commit 758333e9 authored by root's avatar root

Now has a legitimate warning message.

parent 27585bf1
# Can be enabled at the command line with --debug-xxx.
debug_disposal_code = 0
debug_temp_alloc = 1
debug_temp_alloc = 0
debug_coercion = 0
# Write comments into the C code that show where temporary variables
......
......@@ -11377,6 +11377,10 @@ class CoerceFromPyTypeNode(CoercionNode):
if not result_type.create_from_py_utility_code(env):
error(arg.pos,
"Cannot convert Python object to '%s'" % result_type)
elif result_type.is_reference:
warning(arg.pos,
"Cannot pass Python object as %s reference, will pass by copy." % result_type,
level=1)
if self.type.is_string or self.type.is_pyunicode_ptr:
if self.arg.is_name and self.arg.entry and self.arg.entry.is_pyglobal:
warning(arg.pos,
......
......@@ -4,7 +4,6 @@
from __future__ import absolute_import
import re
import copy
import re
......@@ -12,7 +11,7 @@ from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
from . import StringEncoding
from . import Naming
from .Errors import error, warning
from .Errors import error
class BaseType(object):
......@@ -3287,10 +3286,6 @@ class CppClassType(CType):
tags = type_identifier(self),
else:
cls = self.cname[5:]
if self.is_reference:
warning("dwqkokw", -1)
print "warned"
cname = '__pyx_convert_%s_from_py_%s' % (cls, '__and_'.join(tags))
context = {
'template_type_declarations': '\n'.join(declarations),
......
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