2011/3/21 Dag Sverre Seljebotn <d.s.seljeb...@astro.uio.no>:
> On 03/21/2011 11:45 AM, Vitja Makarov wrote:
>>
>> Now error/warning messages are stored in global variables at
>> Cython.Compiler.Errors
>>
>> I think it's much better to move error handling into some object,
>> Main.Context for example.
>>
>> Some benefits:
>>  - reduce use of global variables
>>  - allow more then one cython compiler instance at the time
>>  - make it much easy to implement -Werror
>>  - cython directives can affect message system (fast_fail, werror)
>>  - messages could be easily sorted
>
> +1. I assume the reason this is not done is simply because it would be a lot
> of work and the payback is less than spending time on other stuff.
>
> By attaching the error context to "env" and "code" one can avoid a lot of
> signature changes. I think transforms should take the context in their
> constructor.
>

It could be something like proxy object that takes compiler directives
into account and proxies messages to context.


-- 
vitja.
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to