Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DLNA-RUI
gupnp
Commits
c9000a72
Commit
c9000a72
authored
Sep 05, 2010
by
Jens Georg
Committed by
Zeeshan Ali (Khattak)
Sep 05, 2010
Browse files
Use GSIZE_TO_POINTER/GPOINTER_TO_SIZE
Avoid 64bit problems if glib hands out GTypes > INT_MAX
parent
0e9ca611
Changes
1
Hide whitespace changes
Inline
Side-by-side
libgupnp/gupnp-resource-factory.c
View file @
c9000a72
...
...
@@ -152,7 +152,7 @@ gupnp_resource_factory_create_device_proxy
value
=
g_hash_table_lookup
(
factory
->
priv
->
proxy_type_hash
,
upnp_type
);
if
(
value
)
proxy_type
=
GPOINTER_TO_
INT
(
value
);
proxy_type
=
GPOINTER_TO_
SIZE
(
value
);
g_free
(
upnp_type
);
}
...
...
@@ -213,7 +213,7 @@ gupnp_resource_factory_create_service_proxy
value
=
g_hash_table_lookup
(
factory
->
priv
->
proxy_type_hash
,
service_type
);
if
(
value
)
proxy_type
=
GPOINTER_TO_
INT
(
value
);
proxy_type
=
GPOINTER_TO_
SIZE
(
value
);
}
proxy
=
g_object_new
(
proxy_type
,
...
...
@@ -272,7 +272,7 @@ gupnp_resource_factory_create_device
value
=
g_hash_table_lookup
(
factory
->
priv
->
resource_type_hash
,
upnp_type
);
if
(
value
)
device_type
=
GPOINTER_TO_
INT
(
value
);
device_type
=
GPOINTER_TO_
SIZE
(
value
);
g_free
(
upnp_type
);
}
...
...
@@ -334,7 +334,7 @@ gupnp_resource_factory_create_service
value
=
g_hash_table_lookup
(
factory
->
priv
->
resource_type_hash
,
upnp_type
);
if
(
value
)
service_type
=
GPOINTER_TO_
INT
(
value
);
service_type
=
GPOINTER_TO_
SIZE
(
value
);
g_free
(
upnp_type
);
}
...
...
@@ -371,7 +371,7 @@ gupnp_resource_factory_register_resource_type (GUPnPResourceFactory *factory,
{
g_hash_table_insert
(
factory
->
priv
->
resource_type_hash
,
g_strdup
(
upnp_type
),
G
INT
_TO_POINTER
(
type
));
G
SIZE
_TO_POINTER
(
type
));
}
/**
...
...
@@ -414,7 +414,7 @@ gupnp_resource_factory_register_resource_proxy_type
{
g_hash_table_insert
(
factory
->
priv
->
proxy_type_hash
,
g_strdup
(
upnp_type
),
G
INT
_TO_POINTER
(
type
));
G
SIZE
_TO_POINTER
(
type
));
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment