Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
4b2418bb
Commit
4b2418bb
authored
16 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add code to make original object available to copy constructor.
parent
10780441
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/ZMap/zmapBase.h
+5
-2
5 additions, 2 deletions
src/include/ZMap/zmapBase.h
src/zmapUtils/zmapBase.c
+13
-3
13 additions, 3 deletions
src/zmapUtils/zmapBase.c
with
18 additions
and
5 deletions
src/include/ZMap/zmapBase.h
+
5
−
2
View file @
4b2418bb
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Jun 12 14:07
2008 (
rds
)
* Last edited:
Oct 24 11:48
2008 (
edgrif
)
* Created: Thu Jun 12 12:09:39 2008 (rds)
* CVS info: $Id: zmapBase.h,v 1.
1
2008-
06-13 08:53:29 rds
Exp $
* CVS info: $Id: zmapBase.h,v 1.
2
2008-
10-29 16:01:57 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -71,6 +71,9 @@ typedef struct _zmapBaseClassStruct zmapBaseClass;
*/
GType
zMapBaseGetType
(
void
);
#define ZMAPBASECOPY_PARAMDATA_KEY "ZMap_Base_Copy_Key"
ZMapBase
zMapBaseCopy
(
ZMapBase
src
);
gboolean
zMapBaseCCopy
(
ZMapBase
src
,
ZMapBase
*
dest_out
);
...
...
This diff is collapsed.
Click to expand it.
src/zmapUtils/zmapBase.c
+
13
−
3
View file @
4b2418bb
...
...
@@ -25,11 +25,11 @@
*
* Description:
*
* Exported functions: See
XXXXXXXXXXXXX
.h
* Exported functions: See
ZMap/zmapBase
.h
* HISTORY:
* Last edited:
Jun 16 20:47
2008 (
rds
)
* Last edited:
Oct 29 16:01
2008 (
edgrif
)
* Created: Thu Jun 12 12:02:12 2008 (rds)
* CVS info: $Id: zmapBase.c,v 1.
2
2008-0
6
-2
5
1
4
:01:
44 rds
Exp $
* CVS info: $Id: zmapBase.c,v 1.
3
2008-
1
0-2
9
1
6
:01:
57 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -274,6 +274,7 @@ static gboolean zmapBaseCopy(ZMapBase src, ZMapBase *dest_out, gboolean referenc
return
copied
;
}
static
void
zmapBaseCopyConstructor
(
const
GValue
*
src_value
,
GValue
*
dest_value
)
{
GObject
*
gobject_src
;
...
...
@@ -323,8 +324,17 @@ static void zmapBaseCopyConstructor(const GValue *src_value, GValue *dest_value)
gobject_class
->
get_property
(
gobject_src
,
param_id
,
&
value
,
current
);
/* Store a pointer to this object on the param spec so it can be retrieved in the
* objects copy code, need to do this otherwise copy code cannot see original object ! */
g_param_spec_set_qdata
(
current
,
g_quark_from_string
(
ZMAPBASECOPY_PARAMDATA_KEY
),
gobject_src
)
;
/* do the copy... */
zmap_class
->
copy_set_property
(
gobject_dest
,
param_id
,
&
value
,
current
);
/* Now remove it, V. IMPORTANT because "set-property" routine gets called during copy
* but MUST be able to tell difference between a "set" call and a "copy" call. */
g_param_spec_set_qdata
(
current
,
g_quark_from_string
(
ZMAPBASECOPY_PARAMDATA_KEY
),
NULL
)
;
g_value_unset
(
&
value
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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