It's a bit hackish, but you can try adding a negative lookahead, like this:
/(?:char|int)s*([A-z0-9]*)s*=s*"(.*)"(?![^{]*})/
^^^^^^^^^^^
This assumes that all braces are balanced, and fortunately nestedness shouldn't matter (whereas normally it would, in similar questions) since you're looking for the case outside brackets.
The lookahead is based on this observation: If you encounter a close-brace without encountering an open-brace, then we might reasonably assume that we're within braces.
One is tempted to extend this the other way to include a negative lookbehind, but unfortunately most implementations do not support variable-length lookbehinds.
EDIT:
As discussed in the comments below, these fixes are recommended:
/(?:char|int)s*([A-Za-z0-9]*)s*=s*"([^"]*)"(?![^{]*})/
^^^ ^^^^^
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…