public QDate ReadDate(string str, KLocale.ReadDateFlags flags, ref bool ok)
{
StackItem[] stack = new StackItem[4];
#if DEBUG
stack[1].s_class = (IntPtr) DebugGCHandle.Alloc(str);
#else
stack[1].s_class = (IntPtr) GCHandle.Alloc(str);
#endif
stack[2].s_int = (int) flags;
stack[3].s_bool = ok;
interceptor.Invoke("readDate$$$", "readDate(const QString&, KLocale::ReadDateFlags, bool*) const", stack);
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[1].s_class);
#else
((GCHandle) stack[1].s_class).Free();
#endif
ok = stack[3].s_bool;
object returnValue = ((GCHandle) stack[0].s_class).Target;
#if DEBUG
DebugGCHandle.Free((GCHandle) stack[0].s_class);
#else
((GCHandle) stack[0].s_class).Free();
#endif
return (QDate) returnValue;
}