Bug 31198

Summary: Windows portability patches for telepathy-glib
Product: Telepathy Reporter: Thomas Flüeli <tflueeli>
Component: tp-glibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: 0.12   
Hardware: Other   
OS: Windows (All)   
URL: http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/012-windows
Whiteboard:
i915 platform: i915 features:
Attachments: patch 1
patch 2

Description Thomas Flüeli 2010-10-28 07:26:51 UTC
Created attachment 39854 [details] [review]
patch 1

I've made some changes to get telepathy-glib compile with MSVC 9.
Comment 1 Thomas Flüeli 2010-10-28 07:27:12 UTC
Created attachment 39855 [details] [review]
patch 2
Comment 2 Simon McVittie 2010-10-29 05:22:58 UTC
Review of attachment 39854 [details] [review]:

This isn't really the right fix; we should be using G_VA_COPY() instead.
Comment 3 Simon McVittie 2010-10-29 05:25:28 UTC
Review of attachment 39855 [details] [review]:

The previous implementation dynamically allocated more stack, which is meant to work, but I can see that it's not necessarily the most portable thing to do.

We prefer to use g_malloc() and g_free() instead of malloc() and free().

I'd be inclined to remove the artificial block now that we're not using it for its side-effect of letting us have more stack. I'll prepare an alternative patch.
Comment 4 Simon McVittie 2010-10-29 05:48:31 UTC
See the URL field for a branch which should hopefully also fix these; please let me know whether it works. Thanks for your patches!
Comment 5 Thomas Flüeli 2010-10-30 09:37:48 UTC
(In reply to comment #2)
> This isn't really the right fix; we should be using G_VA_COPY() instead.

Perfect, I didn't know that G_VA_COPY() exists.

Your branch looks good and works fine.
Comment 6 Simon McVittie 2010-11-01 05:12:46 UTC
Fixed in git for 0.12.3 and 0.13.4, thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.