Changeset - b3cdfe561929
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-04-10 11:05:09
hanzz.k@gmail.com
fixed return types
1 file changed with 12 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/gen_dynamic_purple.py
Show inline comments
 
@@ -56,12 +56,19 @@ def handle_header(header, method):
 
		if line.find(method) != -1:
 
			m = line[:-1]
 
			l = unicode(m).strip()
 
			if l.endswith(")"):
 
				continue
 

	
 
			if m.find("/*") > m.find(";"):
 
				m = m[:m.find("/*")]
 
				m.rstrip()
 
				if len(m) != 0:
 
					while m[-1] == " ":
 
						m = m[:-1]
 

	
 
			index = i;
 
			while not m.endswith(";"):
 
				index += 1
 
				m += " " + lines[index][:-1].lstrip()
 

	
 
			l = unicode(m).strip()
 
@@ -90,16 +97,20 @@ def get_args(d):
 
		args += [y[-1].replace("*", "")]
 

	
 
	return args
 

	
 
def get_name(d):
 
	x = d[:d.find("(")+1].lstrip()
 
	if x.find("wpurple_") != -1:
 
		return x[x.find("wpurple_"):]
 
	return x[x.find("purple_"):]
 

	
 
def get_rtype(d):
 
	return d[:d.find("purple_") - 1].lstrip()
 
	if d.find("wpurple_") != -1:
 
		return d[:d.find("wpurple_")].lstrip()
 
	return d[:d.find("purple_")].lstrip()
 

	
 
def output():
 
	global definitions
 

	
 
	header = open("purple_defs.h", "w")
 
	print >> header, "#pragma once"
0 comments (0 inline, 0 general)