Giter Site home page Giter Site logo

cymbal's Introduction

Cymbal

Overview

Cymbal makes it easy to add functionality missing from libclang Python bindings

The Clang libclang python bindings use ctypes to invoke functions present in libclang dynamic library. In some cases, only a subset of the C functions are available, because the platform or version specific Python bindings omit functions. Cymbal simplfies the process of dynamically adding those methods to Types and Cursors.

MIT License Continuous Integration Coverage Testing Results

Usage

Import Cymbal, monkeypatch any required functions, adding appropriate ctypes annotations as necessary.

import clang.cindex
from clang.cindex import *
import cymbal
from ctypes import *

# add functions omitted from the pip installable clang packages on OSX

cymbal.monkeypatch_type('get_template_argument_type',
                        'clang_Type_getTemplateArgumentAsType',
                        [Type, c_uint],
                        Type)

cymbal.monkeypatch_type('get_num_template_arguments',
                        'clang_Type_getNumTemplateArguments',
                        [Type],
                        c_int)

Requirements

The only requirements are libclang and the python bindings for libclang.

Contributing

If you experience problems with Cymbal, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

Licensing

This project builds on the work of the LLVM team and the University of Illinois at Urbana-Champaign, but is no way affiliated with either group.

cymbal's People

Contributors

andrewwalker avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cadquery

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.