1 | /* |
---|
2 | * lock.c: routines for svn_lock_t objects. |
---|
3 | * |
---|
4 | * ==================================================================== |
---|
5 | * Copyright (c) 2000-2005 CollabNet. All rights reserved. |
---|
6 | * |
---|
7 | * This software is licensed as described in the file COPYING, which |
---|
8 | * you should have received as part of this distribution. The terms |
---|
9 | * are also available at http://subversion.tigris.org/license-1.html. |
---|
10 | * If newer versions of this license are posted there, you may use a |
---|
11 | * newer version instead, at your option. |
---|
12 | * |
---|
13 | * This software consists of voluntary contributions made by many |
---|
14 | * individuals. For exact contribution history, see the revision |
---|
15 | * history and logs, available at http://subversion.tigris.org/. |
---|
16 | * ==================================================================== |
---|
17 | */ |
---|
18 | |
---|
19 | /* ==================================================================== */ |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | /*** Includes. ***/ |
---|
24 | |
---|
25 | #include <apr_strings.h> |
---|
26 | |
---|
27 | #include "svn_types.h" |
---|
28 | |
---|
29 | |
---|
30 | /*** Code. ***/ |
---|
31 | |
---|
32 | svn_lock_t * |
---|
33 | svn_lock_create(apr_pool_t *pool) |
---|
34 | { |
---|
35 | return apr_pcalloc(pool, sizeof(svn_lock_t)); |
---|
36 | } |
---|
37 | |
---|
38 | svn_lock_t * |
---|
39 | svn_lock_dup(const svn_lock_t *lock, apr_pool_t *pool) |
---|
40 | { |
---|
41 | svn_lock_t *new_l = apr_palloc(pool, sizeof(*new_l)); |
---|
42 | |
---|
43 | *new_l = *lock; |
---|
44 | |
---|
45 | new_l->path = apr_pstrdup(pool, new_l->path); |
---|
46 | new_l->token = apr_pstrdup(pool, new_l->token); |
---|
47 | new_l->owner = apr_pstrdup(pool, new_l->owner); |
---|
48 | if (new_l->comment) |
---|
49 | new_l->comment = apr_pstrdup(pool, new_l->comment); |
---|
50 | |
---|
51 | return new_l; |
---|
52 | } |
---|