> On May 7, 2013, at 14:51 , Nick Wellnhofer <[email protected]> wrote: > Thinking more about it, this shouldn't be a problem. Only objects that can > safely be decref'd should ever be passed as 'decremented' argument. So if a > caller wants to pass a string which might be a wrapped host language string, > it must be incref'd anyway. Only the following would be unsafe: > > some_func(..., String *string, ...) { > ... > String *captured = (String*)CAPTURE(string); > // Should pass 'captured', not 'string' > VA_Push(array, string); > ... > } > > I think it should be clear that 'captured' must be passed instead of > 'string'.
I agree with this assessment. Nevertheless, it has to be acknowledged that the CAPTURE construct is unfamiliar and imposes a burden on downstream programmers writing Clownfish-flavored C. Marvin Humphrey
