Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
b0240972
Vérifiée
Valider
b0240972
rédigé
5 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Correct segfault
parent
2b82d5af
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Étiquettes contenant la validation
1 requête de fusion
!102
Modules
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
inc/lektor/reg.h
+2
-2
2 ajouts, 2 suppressions
inc/lektor/reg.h
src/reg.c
+6
-6
6 ajouts, 6 suppressions
src/reg.c
avec
8 ajouts
et
8 suppressions
inc/lektor/reg.h
+
2
−
2
Voir le fichier @
b0240972
...
...
@@ -14,7 +14,7 @@ struct module_reg {
const
char
*
name
;
union
{
reg_func
func
;
struct
module_reg
*
obj
;
struct
module_reg
*
*
obj
;
/* First item of the array */
};
};
...
...
@@ -29,7 +29,7 @@ struct lkt_module {
#define REG_BEGIN(reg) struct module_reg reg[] = {
#define REG_ADD(f) { .name = #f, .func = f },
#define REG_ADD_NAMED(n, f) { .name = n, .func = f },
#define REG_REGISTER(n, s) { .name = n, .obj = s
},
#define REG_REGISTER(n, s) { .name = n, .obj =
&
s },
#define REG_END() { .name = NULL, .func = NULL } };
#define REG_DEFINE(reg) struct module_reg reg* = NULL;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/reg.c
+
6
−
6
Voir le fichier @
b0240972
...
...
@@ -24,9 +24,9 @@ void *
__reg_get
(
struct
module_reg
*
reg
,
const
char
*
name
)
{
int
i
;
for
(
i
=
0
;
reg
[
i
].
name
&&
reg
[
i
].
obj
;
++
i
)
{
if
(
STR_MATCH
(
reg
[
i
].
name
,
name
))
return
reg
[
i
].
obj
;
for
(
i
=
0
;
(
reg
+
i
)
->
name
&&
(
reg
+
i
)
->
obj
;
++
i
)
{
if
(
STR_MATCH
(
(
reg
+
i
)
->
name
,
name
))
return
(
reg
+
i
)
->
obj
;
}
return
NULL
;
}
...
...
@@ -35,9 +35,9 @@ reg_func
__reg_func
(
struct
module_reg
*
reg
,
const
char
*
name
)
{
int
i
;
for
(
i
=
0
;
reg
[
i
].
name
&&
reg
[
i
].
func
;
++
i
)
{
if
(
STR_MATCH
(
reg
[
i
].
name
,
name
))
return
reg
[
i
].
func
;
for
(
i
=
0
;
(
reg
+
i
)
->
name
&&
(
reg
+
i
)
->
func
;
++
i
)
{
if
(
STR_MATCH
(
(
reg
+
i
)
->
name
,
name
))
return
(
reg
+
i
)
->
func
;
}
return
NULL
;
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter