Exemple #1
0
def c_output_free_funs(header, impl, intro, cfg):
    """writes callables declarations/definitions"""
    s = sig.c_signature(cfg)
    funcs = [(s.get(f), f) for f in intro.exported_freefunctions()]
    funcs.sort()
    header.write('\n/* ==== free functions ==== */\n')
    for csig, free_fun in funcs:
        header.write("%s;\n" % csig)
        impl.write("%s\n" % csig)
        c_callable_body(impl, free_fun, cfg)
Exemple #2
0
def c_output_free_funs(header, impl, intro, cfg):
    """writes callables declarations/definitions"""
    s = sig.c_signature(cfg)
    funcs = [(s.get(f),f) for f in intro.exported_freefunctions()]
    funcs.sort()
    header.write('\n/* ==== free functions ==== */\n')
    for csig, free_fun in funcs:
        header.write("%s;\n" % csig)
        impl.write("%s\n" % csig)
        c_callable_body(impl, free_fun, cfg)
Exemple #3
0
def c_output_class_methods(header, impl, intro, cfg):
    """writes callables declarations/definitions"""
    s = sig.c_signature(cfg)
    header.write('\n/* ==== methods ===== */\n')
    methods = [(s.get(m), m) \
               for cls in intro.exported_classes()
               for m in cls.methods()]
    methods.sort()
    for csig, m in methods:
        csig = s.get(m)
        header.write("%s;\n" % csig)
        impl.write("%s\n" % csig)
        c_callable_body(impl, m, cfg)
Exemple #4
0
def c_output_class_methods(header, impl, intro, cfg):
    """writes callables declarations/definitions"""
    s = sig.c_signature(cfg)
    header.write('\n/* ==== methods ===== */\n')
    methods = [(s.get(m), m) \
               for cls in intro.exported_classes()
               for m in cls.methods()]
    methods.sort()
    for csig, m in methods:
        csig = s.get(m)
        header.write("%s;\n" % csig)
        impl.write("%s\n" % csig)
        c_callable_body(impl, m, cfg)