INNER CODE UNIT · Python
remove_prototype
tanersener/mobile-ffmpeg · src/libsndfile/make_lite.py:79
def remove_prototype (source, proto_name):
proto_text = find_function_prototype (source, proto_name)
if not proto_text:
print "remove_prototype : prototype '%s' not found. Exiting." % proto_name
sys.exit (1)
source = string.replace (source, proto_text, "")
return source
def remove_function (source, func_name):
func_text = find_function_definition (source, func_name)
if not func_text:
print "remove_function : function '%s' not found. Exiting." % func_name
sys.exit (1)
source = string.replace (source, func_text, "/* Function %s() removed here. */\n" % func_name)
return source