Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
454
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
ed9eaacc
Commit
ed9eaacc
authored
5 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
object: store a pointer to private data
This effectively reverts commit
07998682
.
parent
e3ed2a79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/vlc_objects.h
+2
-0
2 additions, 0 deletions
include/vlc_objects.h
src/misc/objects.c
+2
-0
2 additions, 0 deletions
src/misc/objects.c
src/misc/variables.h
+1
-1
1 addition, 1 deletion
src/misc/variables.h
with
5 additions
and
1 deletion
include/vlc_objects.h
+
2
−
0
View file @
ed9eaacc
...
...
@@ -29,6 +29,7 @@
*/
struct
vlc_logger
;
struct
vlc_object_internals
;
/**
* VLC object common members
...
...
@@ -40,6 +41,7 @@ struct vlc_logger;
struct
vlc_common_members
{
struct
vlc_logger
*
logger
;
struct
vlc_object_internals
*
priv
;
bool
no_interact
;
...
...
This diff is collapsed.
Click to expand it.
src/misc/objects.c
+
2
−
0
View file @
ed9eaacc
...
...
@@ -85,6 +85,8 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
priv
->
resources
=
NULL
;
vlc_object_t
*
obj
=
(
vlc_object_t
*
)(
priv
+
1
);
obj
->
obj
.
priv
=
priv
;
obj
->
obj
.
force
=
false
;
memset
(
obj
+
1
,
0
,
length
-
sizeof
(
*
obj
));
/* type-specific stuff */
...
...
This diff is collapsed.
Click to expand it.
src/misc/variables.h
+
1
−
1
View file @
ed9eaacc
...
...
@@ -48,7 +48,7 @@ struct vlc_object_internals
struct
vlc_res
*
resources
;
};
# define vlc_internals(
obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1
)
# define vlc_internals(
o) ((o)->obj.priv
)
# define vlc_externals( priv ) ((vlc_object_t *)((priv) + 1))
extern
void
var_DestroyAll
(
vlc_object_t
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment