Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0407f5

Browse files
committed
Add comment about void* use in MemSet.
1 parent0e5c62d commita0407f5

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

‎src/include/c.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.188 2005/07/18 15:53:28 tgl Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.189 2005/07/21 15:16:27 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -630,6 +630,7 @@ typedef NameData *Name;
630630
#defineMemSet(start,val,len) \
631631
do \
632632
{ \
633+
/* must be void* because we don't know if it is integer aligned yet */ \
633634
void *_vstart = (void *) (start); \
634635
int_val = (val); \
635636
Size_len = (len); \

‎src/include/utils/timestamp.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.49 2005/07/2104:48:42 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.50 2005/07/2115:16:27 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -63,6 +63,12 @@ typedef struct
6363
/* in both timestamp.h and ecpg/dt.h */
6464
#defineDAYS_PER_YEAR365.25/* assumes leap year every four years */
6565
#defineMONTHS_PER_YEAR12
66+
/*
67+
*DAYS_PER_MONTH is very imprecise. The more accurate value is
68+
*365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only
69+
*return an integral number of days, but someday perhaps we should
70+
*also return a 'time' value to be used as well.
71+
*/
6672
#defineDAYS_PER_MONTH30/* assumes exactly 30 days per month */
6773
#defineHOURS_PER_DAY24/* assume no daylight savings time changes */
6874

‎src/interfaces/ecpg/pgtypeslib/dt.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ do { \
219219
/* in both timestamp.h and ecpg/dt.h */
220220
#defineDAYS_PER_YEAR365.25/* assumes leap year every four years */
221221
#defineMONTHS_PER_YEAR12
222+
/*
223+
*DAYS_PER_MONTH is very imprecise. The more accurate value is
224+
*365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only
225+
*return an integral number of days, but someday perhaps we should
226+
*also return a 'time' value to be used as well.
227+
*/
222228
#defineDAYS_PER_MONTH30/* assumes exactly 30 days per month */
223229
#defineHOURS_PER_DAY24/* assume no daylight savings time changes */
224230

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp