Summary: | Add pycairo_context_get utility macro | ||
---|---|---|---|
Product: | pycairo | Reporter: | Gustavo J. A. M. Carneiro <gjc> |
Component: | general | Assignee: | Steve Chaplin <d74n5pohf9> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Gustavo J. A. M. Carneiro
2005-06-04 07:31:30 UTC
I've added: #define PycairoContext_GET(obj) (((PycairoContext *)(obj))->ctx) Added an extra "()" round obj, changed pycairo_context to one word, and used some uppercase - I've been following the PEP 7 "Style Guide for C code", where it suggests: - Public functions and variables use MixedCase with underscores, like this: PyObject_GetAttr, Py_BuildValue, PyExc_TypeError. - Macros should have a MixedCase prefix and then use upper case, for example: PyString_AS_STRING, Py_PRINT_RAW. Cool :-) |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.